#ifndef __WIZ_GEOMETRY_GEOMETRY_RAY_HPP__SHANHAOBO_19800429__
#define __WIZ_GEOMETRY_GEOMETRY_RAY_HPP__SHANHAOBO_19800429__

#include "../../WizAlgebra/Include/Utils/WizAlgebraUtils.hpp"
#include "../../WizAlgebra/Include/Linear/Vector3/WizAlgebraVector3.hpp"

namespace Wiz
{
    namespace Ray
    {
        template<class ElementT>
        struct Type
        {
            WIZ_DECLARE_CLASS_THIS(Type);

            typedef ElementT                          tElement;

            typedef ::Wiz::Vector3::Type<tElement>    tVector3;
        protected:
            tVector3 m_Origin;
            tVector3 m_Direction;
        public:
            Type()
            {}
            Type(const tVector3& Orgn, const tVector3& Dir) : m_Origin(Orgn), m_Direction(Dir)
            {
            }
        public:
            tVector3& GetOrigin()
            {
                return this->m_Origin;
            }
            tVector3& GetDirection()
            {
                return this->m_Direction;
            }
            const tVector3& GetOrigin() const
            {
                return this->m_Origin;
            }
            const tVector3& GetDirection() const
            {
                return this->m_Direction;
            }
        public:
            ::Wiz::Void::Type SetOrigin(tVector3& Orgn)
            {
                this->m_Origin = Orgn;
            }
            ::Wiz::Void::Type SetDirection(tVector3& Dir)
            {
                this->m_Direction = Dir;
            }
        public:
            tVector3 GetPoint(tElement t)
            {
                return this->m_Origin + this->m_Direction * t;
            }

            tVector3 GetPoint(tElement t) const
            {
                return this->m_Origin + this->m_Direction * t;
            }
        }; /// end of struct Type
    } /// end of namespace Ray
} /// end of namespace Wiz

#endif /*__WIZ_GEOMETRY_GEOMETRY_RAY3D_HPP__SHANHAOBO_19800429__*/
